Optimal. Leaf size=266 \[ \frac{(a+b x)^{m+1} (c+d x)^n \left (\frac{b (c+d x)}{b c-a d}\right )^{-n} \, _2F_1\left (m+1,-n;m+2;-\frac{d (a+b x)}{b c-a d}\right ) \left (a^2 d^2 f h (n+1) (n+2)+a b d (n+1) (2 c f h (m+1)-d (m+n+3) (e h+f g))+b^2 \left (c^2 f h (m+1) (m+2)-c d (m+1) (m+n+3) (e h+f g)+d^2 e g (m+n+2) (m+n+3)\right )\right )}{b^3 d^2 (m+1) (m+n+2) (m+n+3)}-\frac{(a+b x)^{m+1} (c+d x)^{n+1} (a d f h (n+2)+b c f h (m+2)-b d (m+n+3) (e h+f g)-b d f h x (m+n+2))}{b^2 d^2 (m+n+2) (m+n+3)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.165118, antiderivative size = 266, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.12, Rules used = {147, 70, 69} \[ \frac{(a+b x)^{m+1} (c+d x)^n \left (\frac{b (c+d x)}{b c-a d}\right )^{-n} \, _2F_1\left (m+1,-n;m+2;-\frac{d (a+b x)}{b c-a d}\right ) \left (a^2 d^2 f h (n+1) (n+2)+a b d (n+1) (2 c f h (m+1)-d (m+n+3) (e h+f g))+b^2 \left (c^2 f h (m+1) (m+2)-c d (m+1) (m+n+3) (e h+f g)+d^2 e g (m+n+2) (m+n+3)\right )\right )}{b^3 d^2 (m+1) (m+n+2) (m+n+3)}-\frac{(a+b x)^{m+1} (c+d x)^{n+1} (a d f h (n+2)+b c f h (m+2)-b d (m+n+3) (e h+f g)-b d f h x (m+n+2))}{b^2 d^2 (m+n+2) (m+n+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 147
Rule 70
Rule 69
Rubi steps
\begin{align*} \int (a+b x)^m (c+d x)^n (e+f x) (g+h x) \, dx &=-\frac{(a+b x)^{1+m} (c+d x)^{1+n} (b c f h (2+m)+a d f h (2+n)-b d (f g+e h) (3+m+n)-b d f h (2+m+n) x)}{b^2 d^2 (2+m+n) (3+m+n)}+\frac{\left (a^2 d^2 f h (1+n) (2+n)+a b d (1+n) (2 c f h (1+m)-d (f g+e h) (3+m+n))+b^2 \left (c^2 f h (1+m) (2+m)-c d (f g+e h) (1+m) (3+m+n)+d^2 e g (2+m+n) (3+m+n)\right )\right ) \int (a+b x)^m (c+d x)^n \, dx}{b^2 d^2 (2+m+n) (3+m+n)}\\ &=-\frac{(a+b x)^{1+m} (c+d x)^{1+n} (b c f h (2+m)+a d f h (2+n)-b d (f g+e h) (3+m+n)-b d f h (2+m+n) x)}{b^2 d^2 (2+m+n) (3+m+n)}+\frac{\left (\left (a^2 d^2 f h (1+n) (2+n)+a b d (1+n) (2 c f h (1+m)-d (f g+e h) (3+m+n))+b^2 \left (c^2 f h (1+m) (2+m)-c d (f g+e h) (1+m) (3+m+n)+d^2 e g (2+m+n) (3+m+n)\right )\right ) (c+d x)^n \left (\frac{b (c+d x)}{b c-a d}\right )^{-n}\right ) \int (a+b x)^m \left (\frac{b c}{b c-a d}+\frac{b d x}{b c-a d}\right )^n \, dx}{b^2 d^2 (2+m+n) (3+m+n)}\\ &=-\frac{(a+b x)^{1+m} (c+d x)^{1+n} (b c f h (2+m)+a d f h (2+n)-b d (f g+e h) (3+m+n)-b d f h (2+m+n) x)}{b^2 d^2 (2+m+n) (3+m+n)}+\frac{\left (a^2 d^2 f h (1+n) (2+n)+a b d (1+n) (2 c f h (1+m)-d (f g+e h) (3+m+n))+b^2 \left (c^2 f h (1+m) (2+m)-c d (f g+e h) (1+m) (3+m+n)+d^2 e g (2+m+n) (3+m+n)\right )\right ) (a+b x)^{1+m} (c+d x)^n \left (\frac{b (c+d x)}{b c-a d}\right )^{-n} \, _2F_1\left (1+m,-n;2+m;-\frac{d (a+b x)}{b c-a d}\right )}{b^3 d^2 (1+m) (2+m+n) (3+m+n)}\\ \end{align*}
Mathematica [A] time = 0.235778, size = 195, normalized size = 0.73 \[ \frac{(a+b x)^{m+1} (c+d x)^n \left (\frac{b (c+d x)}{b c-a d}\right )^{-n} \left (b \left (b (d e-c f) (d g-c h) \, _2F_1\left (m+1,-n;m+2;\frac{d (a+b x)}{a d-b c}\right )-(b c-a d) (2 c f h-d (e h+f g)) \, _2F_1\left (m+1,-n-1;m+2;\frac{d (a+b x)}{a d-b c}\right )\right )+f h (b c-a d)^2 \, _2F_1\left (m+1,-n-2;m+2;\frac{d (a+b x)}{a d-b c}\right )\right )}{b^3 d^2 (m+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.065, size = 0, normalized size = 0. \begin{align*} \int \left ( bx+a \right ) ^{m} \left ( dx+c \right ) ^{n} \left ( fx+e \right ) \left ( hx+g \right ) \, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (f x + e\right )}{\left (h x + g\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (f h x^{2} + e g +{\left (f g + e h\right )} x\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{n}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (f x + e\right )}{\left (h x + g\right )}{\left (b x + a\right )}^{m}{\left (d x + c\right )}^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]